package grasshopper.gcm.test.db;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import main.GCMConstants;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author piokob
 */
public class GCMDBbootstrap {

    private static EntityManager em;
    private static EntityManagerFactory emf;

    public GCMDBbootstrap() {
    }

    @BeforeClass
    public static void setUpClass() throws Exception {
        emf = Persistence.createEntityManagerFactory(GCMConstants.gcmPUDropbCreate);
        em = emf.createEntityManager();
    }

    @AfterClass
    public static void tearDownClass() throws Exception {
        if (em != null) {
            em.close();
        }
        if (emf != null) {
            emf.close();
        }
    }

    @Before
    public void setUp() {
        System.out.println("setup @before");
    }

    @After
    public void tearDown() {
        System.out.println("teardown @after");
    }

    @Test
    public void testHello() {
        assertTrue(true);
    }
}
